#!/usr/bin/env bash
binpath="/media/data/Projects/Sambaindex/trunk"
datapath="/media/data/Projects/Sambaindex"

# start new scan
$binpath/startscan.py

# scan for samba shares
/usr/local/bin/sambascanner --threadcnt 60 --ipconnect --workgroup MSOE --ip 155.92.100-115.1-255 --outfile $datapath/Filelist.txt --debug 4 2>$datapath/sambascanner.log &&
$binpath/insertsamba.py | tee $datapath/insertsamba.log 
$binpath/insertftp.py | tee $datapath/insertftp.log

# populate file formats
$binpath/extensions.py

# fix up the path+file index
$binpath/updateindex.py

# update LastScan
$binpath/finishscan.py
